<style include="diagnostics-shared diagnostics-fonts"></style>

<diagnostics-card>
  <div id="cardTitle" slot="title" aria-describedby="cpuChipInfo">
    [[i18n('cpuTitle')]]
  </div>
  <div id="cpuChipInfo" slot="chip" class="diagnostics-chip" aria-hidden="true">
    [[cpuChipInfo_]]
  </div>
  <iron-icon slot="icon" icon="diagnostics:cpu"></iron-icon>
  <realtime-cpu-chart slot="left-panel" id="realtimeCpuChart"
    user="[[cpuUsage_.percentUsageUser]]"
    system="[[cpuUsage_.percentUsageSystem]]">
  </realtime-cpu-chart>
  <data-point slot="body" id="cpuUsageUser"
    header="[[i18n('cpuUsageLabel')]]"
    value="[[getCurrentlyUsing_(cpuUsage_.percentUsageSystem,
        cpuUsage_.percentUsageUser)]]"
    tooltip-text="[[getCpuUsageTooltipText_()]]"
    class="data-point-margin-start">
  </data-point>
  <div slot="body" class="divider"></div>
  <data-point slot="body" id="cpuTemp" header="[[i18n('cpuTempLabel')]]"
    value="[[getCpuTemp_(cpuUsage_.averageCpuTempCelsius)]]">
  </data-point>
  <div slot="body" class="divider"></div>
  <data-point slot="body" id="cpuSpeed" class="data-point-margin-end"
    header="[[i18n('cpuSpeedLabel')]]"
    value="[[getCurrentCpuSpeed_(cpuUsage_.scalingCurrentFrequencyKhz)]]">
  </data-point>
  <routine-section slot="routines" routines="[[routines_]]"
    routine-runtime="{{getEstimateRuntimeInMinutes_(routines_)}}"
    is-test-running="{{isTestRunning}}"
    run-tests-button-text="[[i18n('runCpuTestText')]]">
  </routine-section>
</diagnostics-card>
